<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Ruoli-API - Documentation</title>
<link href="/static/main.css" rel="stylesheet" type="text/css">
<style type="text/css">
#noscript-content {
	background: white;
	padding: 16px 32px;
	border-radius: 3px;
	max-width: 600px;
	margin: 100px auto;
	color: #282828;
}

#noscript-content p, #noscript-content ul {
	line-height: 1.7;
}

#noscript-content ul {
	padding-left: 24px;
}

#noscript-content li {
	margin: 8px 0;
}

.docs-body {
	margin-left: 0% !important;
}
</style>

</head>
<body class="pm-main-body">
	<div id="app-mount-point">
		<main>
		<div class="collection">
			<div class="docs-body docs-body--double-col">

				<div class="docs-item" id="a192d4ce-3ebb-4b7f-a6e1-dac6e6b70a82">
					<div class="docs-desc">
						<h1 class="pm-h1 docs-desc-title docs-desc-title--head"
							id="introduction">Ruoli-API</h1>
						<div class="docs-desc-body pm-markdown">
							根据Hash值可以查看位于区块链上的数据，例如：<br>
							https://ipfs.io/ipfs/QmRguPCYJZVGSFtntNospGuZWTHLSV93LXEDTDoBApYyVX/
						</div>
					</div>
				</div>
				<div class="docs-item" id="bede9da3-26fc-44df-8fbb-54287bb55feb">
					<div class="docs-desc">
						<div>
							<h2 class="pm-h2 docs-desc-title docs-desc-title--request">
								<span class="pm-method-color-get">GET </span>读取IPFS数据
							</h2>
							<div class="docs-desc-title__url">http://ruoli.ink/ipfs/QmRguPCYJZVGSFtntNospGuZWTHLSV93LXEDTDoBApYyVX</div>
						</div>
						<div class="docs-desc-body">
							<div class="pm-markdown">
								<p>返回读取的状态和值（status值为1时读取成功,result为读取出来的结果数据;值为-1时读取失败，result为错误信息）</p>
							</div>
						</div>
					</div>
					<div class="docs-example">
						<div class="docs-example__request">
							<div class="docs-example__snippet-header">
								<span class="docs-example__snippet-type">Example Request</span>
								<div
									class="docs-example__response-title docs-example__response-title--flush">
									<div
										class="Select pm-dropdown pm-dropdown-sm pm-dropdown-text docs-example__response-dropdown pm-dropdown-text--dark pm-dropdown--align-right Select--single">
										<div class="Select-control">
											<span class="Select-multi-value-wrapper"
												id="react-select-11--value"><div
													class="Select-placeholder">读取IPFS数据</div>
												<div aria-expanded="false" aria-owns=""
													aria-activedescendant="react-select-11--value"
													aria-disabled="false" class="Select-input" role="combobox"
													tabindex="0"
													style="border: 0px; width: 1px; display: inline-block;"></div></span><span
												class="Select-arrow-zone"><span class="Select-arrow"></span></span>
										</div>
									</div>
								</div>
							</div>
							<div class="pm-snippet-container">
								<div class="pm-snippet pm-snippet-wrap">

									<pre class="pm-snippet-body">
										<code class="hljs curl bash">curl --location --request GET <span
												class="hljs-string">"http://ruoli.ink/ipfs/QmRguPCYJZVGSFtntNospGuZWTHLSV93LXEDTDoBApYyVX"</span>
										</code>
									</pre>
								</div>
							</div>
						</div>
						<div class="docs-example__response">
							<div class="docs-example__snippet-header">
								<span class="docs-example__snippet-type">Example Response</span><span
									class="docs-example__response-status" title="200 OK">200
									OK</span>
							</div>
							<div class="pm-snippet-container">
								<div class="pm-snippet pm-snippet-wrap">

									<pre class="pm-snippet-body">
										<code class="hljs json bash">{
  <span class="hljs-string">"status"</span>: 1,
  <span class="hljs-string">"result"</span>: <span class="hljs-string">"ruoli.ink"</span>
}</code>
									</pre>
								</div>
							</div>
						</div>
					</div>
				</div>
				<div class="docs-item" id="3e8213e5-2203-4098-bcf6-5056609972f2">
					<div class="docs-desc">
						<div>
							<h2 class="pm-h2 docs-desc-title docs-desc-title--request">
								<span class="pm-method-color-post">POST </span>写入IPFS数据
							</h2>
							<div class="docs-desc-title__url">http://ruoli.ink/ipfs/</div>
						</div>
						<div class="docs-desc-body">
							<div class="pm-markdown">
								<p>返回对应IPFS区块链公链的Hash值,客户端需要保存此Hash值用于再次查询数据（status值为1时写入成功,值为-1时写入失败）</p>
							</div>
							<div class="docs-request-body">
								<h4 class="pm-h4 docs-request-body__title">Body</h4>
								<span class="docs-request-body__mode push-half--left">formdata</span>
								<table class="pm-table docs-request-table">
									<tbody>
										<tr class="">
											<td class="weight--medium">recode</td>
											<td>ipfs-data
												<div class="pm-markdown docs-request-table__desc"></div>
											</td>
										</tr>
									</tbody>
								</table>
							</div>
						</div>
					</div>
					<div class="docs-example">
						<div class="docs-example__request">
							<div class="docs-example__snippet-header">
								<span class="docs-example__snippet-type">Example Request</span>
								<div
									class="docs-example__response-title docs-example__response-title--flush">
									<div
										class="Select pm-dropdown pm-dropdown-sm pm-dropdown-text docs-example__response-dropdown pm-dropdown-text--dark pm-dropdown--align-right Select--single">
										<div class="Select-control">
											<span class="Select-multi-value-wrapper"
												id="react-select-12--value"><div
													class="Select-placeholder">写入IPFS数据</div>
												<div aria-expanded="false" aria-owns=""
													aria-activedescendant="react-select-12--value"
													aria-disabled="false" class="Select-input" role="combobox"
													tabindex="0"
													style="border: 0px; width: 1px; display: inline-block;"></div></span><span
												class="Select-arrow-zone"><span class="Select-arrow"></span></span>
										</div>
									</div>
								</div>
							</div>
							<div class="pm-snippet-container">
								<div class="pm-snippet pm-snippet-wrap">

									<pre class="pm-snippet-body">
										<code class="hljs curl bash">curl --location --request POST <span
												class="hljs-string">"http://ruoli.ink/ipfs/"</span> \
  --form <span class="hljs-string">"recode=ipfs-data"</span>
										</code>
									</pre>
								</div>
							</div>
						</div>
						<div class="docs-example__response">
							<div class="docs-example__snippet-header">
								<span class="docs-example__snippet-type">Example Response</span><span
									class="docs-example__response-status" title="200 OK">200
									OK</span>
							</div>
							<div class="pm-snippet-container">
								<div class="pm-snippet pm-snippet-wrap">

									<pre class="pm-snippet-body">
										<code class="hljs json bash">{
  <span class="hljs-string">"status"</span>: 1,
  <span class="hljs-string">"hash"</span>: <span class="hljs-string">"QmZRP7mdZ8DiW6k7tqCAft8PZy86krGm71dhvnm9TJZ4Nk"</span>
}</code>
									</pre>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
		</main>
		<div class="pm-toast-container">
			<div></div>
		</div>
	</div>
</body>
</html>